package br.com.r1.jpastandalone.models;

import java.io.Serializable;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;

import br.com.r1.jpastandalone.pk.UserPk;

@Entity
public class User implements Serializable {

	private static final long serialVersionUID = 1L;
	@Column(name="nome")
	private String firstName;
	
	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name="lastName", column=@Column(name="sobrenome")),
			@AttributeOverride(name="sn", column=@Column(name="ssn"))
	})
	private UserPk userPk;

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public UserPk getUserPk() {
		return userPk;
	}

	public void setUserPk(UserPk userPk) {
		this.userPk = userPk;
	}
}
